package com.up360.rapidcalc.aerolite.model
{
    import com.up360.rapidcalc.aerolite.controller.BasicCtrl;
    
    import flash.display.DisplayObject;
    import flash.display.MovieClip;

    /**
     * @author Tunie
     * @date   May 2, 2013
     * 炮管
     */
    public class Barrel extends GameElement
    {
        public static const NORMAL:int=1;
        public static const FIRE:int=2;
        
        private var _state:int;
        public function Barrel()
        {
            super();
        }
        
        override public function set ui(value:DisplayObject):void
        {
            checkUI();
            _ui = value;
            state=1;
        }
        

        public function get state():int
        {
            return _state;
        }

        public function set state(value:int):void
        {
            _state = value;
            (_ui as MovieClip).gotoAndPlay(state);
        }


    }
}